import 'package:equatable/equatable.dart';

class AppStoreApiAccessToken extends Equatable {
  AppStoreApiAccessToken({
    required this.data,
    required this.expirationTime,
  }) : assert(expirationTime.isUtc);

  final String data;
  final DateTime expirationTime;

  bool get isExpired {
    return DateTime.now().toUtc().isAfter(expirationTime);
  }

  @override
  List<Object?> get props {
    return [
      data,
      expirationTime,
    ];
  }
}
